<script setup lang="ts"> 

// import { ref } from 'vue'
// import { ElMessage, ElMessageBox } from 'element-plus'

// import type { UploadProps, UploadUserFile } from 'element-plus'
import { copyFile, BaseDirectory, readBinaryFile    } from '@tauri-apps/api/fs';
import { appDir } from '@tauri-apps/api/path';
import { getName } from '@tauri-apps/api/app';


defineProps<{ msg: string }>()


 
const clickEvent = async ()=>{ 
  // const appName = await getName();
  const contents = await readBinaryFile('D:\\avatar.png', { dir: BaseDirectory.Resource });
  console.log('contents',contents);
}
</script>

<template>
  <!-- <h1>{{ msg }}</h1> -->
<button @click="clickEvent">click</button>
 
    
</template>

<style scoped>
.read-the-docs {
  color: #888;
}
</style>
